package com.newlink.building.main.mvp.model

import com.newlink.building.common_base.base.BaseModel
import com.newlink.building.common_base.http.Base_RetrofitHelper
import com.newlink.building.common_base.model.bean.HttpResult
import com.newlink.building.common_base.model.bean.PropertyManagerData
import com.newlink.building.common_base.model.bean.RoomData
import com.newlink.building.common_base.model.bean.UnitData
import com.newlink.building.main.mvp.contract.Module_Main_ResidentContract
import io.reactivex.Observable

/**
 * @Author: Jake
 * @Date: 2024-10-15
 * @Description:
 */
class Module_Main_ResidentModel : BaseModel(), Module_Main_ResidentContract.Model {
    override fun getUnitList(
        token: String,
        prjId: String,
        name: String
    ): Observable<HttpResult<MutableList<UnitData>>> {
        return Base_RetrofitHelper.service.getUnitList(token, prjId, name)
    }

    override fun getRoomList(
        token: String,
        unitId: String,
        roomName: String,
    ): Observable<HttpResult<MutableList<RoomData>>> {
        return Base_RetrofitHelper.service.getRoomList(token, unitId, roomName)
    }

    override fun getPropertyUserList(
        token: String,
        prjId: String,
        name: String,
    ): Observable<HttpResult<MutableList<PropertyManagerData>>> {
        return Base_RetrofitHelper.service.getPropertyManagerList(token, prjId, name)
    }
}